module.exports = {
    devServer: {
        host: 'localhost',
        port: '8080',
        proxy: {
            //代理的方式是把原来的接口地址改为/api开头的地址
            '/api': {
                target: 'http://localhost:3000/',
                ws: true,
                changeOrigin: true,
                pathRewrite: {
                    '^/api': ''
                }
            }
        }
    }
}